home *** CD-ROM | disk | FTP | other *** search
- /* AmigaShell.jl By Kamran Karimi.
-
- Should be linked with JustLook (© Kamran Karimi) routines.
- */
-
- #include <stdlib.h>
- #include <stdio.h>
- #include <intuition/intuition.h>
- #include <clib/exec_protos.h>
- #include <clib/dos_protos.h>
- #include <clib/intuition_protos.h>
-
- #include "JustLook.h"
-
- struct IntuitionBase *IntuitionBase;
-
- #define Write_err printf("err = %08lx\n",err)
-
- main()
- {
- struct Window *win;
- ErrorCode err;
- struct ScrMap SM;
-
- IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0);
- if(IntuitionBase == 0) exit(100);
-
- win = FindWindow("AmigaShell",NULL);
- if(win > WIN_REPEATED)
- {
- err = IEDisable(MOUSE|KBD); Write_err;
- printf("Mouse and Keyboard disabled!\n");
- Delay(50);
- ActivateWindow(win);
- WindowToFront(win);
- InitSM(&SM,win->WScreen);
- err = WinResize(&SM,win,RELATIVE,-30,-40); Write_err;
- Delay(100);
- err = WinDrag(&SM,win,RELATIVE,30,40); Write_err;
- printf("press a mouse button to continue!\n");
- err = IEWait(MOUSE); Write_err;
- WinAct(&SM,win,DEPTHWIN);
- Delay(100);
- WindowToFront(win);
- Delay(25);
- printf("That was all!\n");
- err = IEEnable(MOUSE|KBD); Write_err;
- }
- else
- {
- if(win == WIN_REPEATED) printf("More than 1 AmigaShell window found!\n");
- else printf("AmigaShell window not found!\n");
- printf("Aborted...\n");
- }
- CloseLibrary((struct Library *)IntuitionBase);
- exit(0);
- }
-